import request from '@/utils/request'

// banner列表
export function BannerList(query) {
    return request({
      url: '/operation-center/banner/list',
      method: 'get',
      params: query
    })
}
// 查询banner
export function getInforBanner(id) {
  return request({
    url: '/operation-center/banner/getBannerMessage/' + id,
    method: 'get'
  })
}
// 修改banner
export function UpdateBanner(data) {
  return request({
    url: '/operation-center/banner',
    method: 'put',
    data: data
  })
}
// 添加banner
export function AddBanner(data) {
  return request({
    url: '/operation-center/banner/addBanner',
    method: 'post',
    data: data
  })
}

// 删除banner
export function DelBanner(id) {
  return request({
    url: '/operation-center/banner/deleteBanner/'+ id,
    method: 'delete',
  })
}

// 上架下架banner
export function updownBanner(ids, on_sell , data) {
  return request({
    url: `/operation-center/banner/${ids}/${on_sell }`,
    method: 'put',
    data: data
  })
}
